package ngames.com.sushitv.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import ngames.com.sushitv.R;
import ngames.com.sushitv.action.RegisterAction;
import ngames.com.sushitv.base.BaseActivity;
import ngames.com.sushitv.entity.UserInfo;

public class RegisterFBActivity extends BaseActivity {
    RegisterAction mRegisterAction;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register_fb);
        mRegisterAction = new RegisterAction(this, findViewById(R.id.base_layout));
        mRegisterAction.onCreate();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        mRegisterAction.onDestroy();
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        mRegisterAction.onActivityResult(requestCode, resultCode, data);
    }

    public static void goRegisterFBActivity(Activity activity, String type, UserInfo userInfo) {
        Intent i = new Intent(activity, RegisterFBActivity.class);
        i.putExtra(RegisterAction.EXTRA_TYPE, type);
        i.putExtra(RegisterAction.EXTRA_USERINFO, userInfo);
        activity.startActivity(i);
    }
}
